<template>
    <el-select :model-value="modelValue" @update:modelValue="updateModelValue">
        <el-option
            v-for="option in options"
            :key="option.value"
            :value="option.value"
            :label="option.label"
        ></el-option>
    </el-select>
</template>

<script lang="ts" setup>
defineProps<{
    modelValue: string | number;
    options: SelectData[];
}>();

const emit = defineEmits<{
    (e: 'update:modelValue', modelValue: string | number): void;
}>();

const updateModelValue = (modelValue: string | number) => {
    emit('update:modelValue', modelValue);
};
</script>

<style lang="scss"></style>
